package servlets;

import javax.servlet.*;
import java.io.IOException;

public class SomeServlet2 implements Servlet {

    public SomeServlet2() {
        System.out.println("创建SomeServlet2实例");
    }

    @Override
    public void init(ServletConfig servletConfig) throws ServletException {
        System.out.println("初始化SomeServlet2实例");
    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }

    @Override
    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {

        System.out.println("执行SomeServlet2的service方法");
    }

    @Override
    public String getServletInfo() {
        return "Some2的版本、作者、应用";
    }

    @Override
    public void destroy() {

        System.out.println("销毁SomeServlet2的实例");
    }
}
